<script setup lang="ts">
import useAppStore from "@/store/modules/app";

const appStore = useAppStore()
</script>

<template>
  <lay-dropdown placement="bottom">
    <slot></slot>
    <template #content>
      <lay-dropdown-menu>
        <lay-dropdown-menu-item
            @click="() => (appStore.locale = 'zh_CN')"
        >
          <template #default>中文</template>
        </lay-dropdown-menu-item>
        <lay-dropdown-menu-item
            @click="() => (appStore.locale = 'en_US')"
        >
          <template #default>英文</template>
        </lay-dropdown-menu-item>
      </lay-dropdown-menu>
    </template>
  </lay-dropdown>
</template>

<style scoped>

</style>
